package com.chw.springbootmybatis.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class User implements Serializable {
    private Long id;
    private String username;
    private String realName;
    private String password;
    private String email;
    private String mobile;
    private String headPic;
    private Boolean status;
    private Long createUser;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    private Long modifyUser;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime modifyTime;
    private Boolean delFlag;

    private Role role;


    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", realName='" + realName + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", mobile='" + mobile + '\'' +
                ", headPic='" + headPic + '\'' +
                ", status=" + status +
                ", createUser=" + createUser +
                ", createTime=" + createTime +
                ", modifyUser=" + modifyUser +
                ", modifyTime=" + modifyTime +
                ", delFlag=" + delFlag +
                ", role=" + role +
                '}';
    }
}
